<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//ES" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<?php
echo $this->loadJs();
echo $this->loadCss();;
?>
<head>
    <style>
        tr,td{
            padding: 10px;
        }
        #logo{margin: 20px;}
        a{
            text-align: right;
            text-decoration: none;
            font-size: 10px;
            color: #49AFCD;
            top: 0;
            float: right;
        }
        #forgot{
            margin: 0;
            padding: 0;
            font-size:11px;
            height: 11px;
            line-height: 11px;
        }
    </style>
    <script type="text/javascript">
        function doSubmit(){
            var pass = $.md5($("#password").val());
            $("#password").val(pass);
        }
        function hideAlert(){
            $("#value-alert").hide(1000);
        }
        $(document).ready(function(){
            setTimeout("hideAlert()",7500);
            
            $("#login-form").validate({
                rules: {
                    username: {
                        required: true
                    },
                    password:{
                        required: true
                    }
                },
                messages:{
                    username: "Username required",
                    password: "Password required"
                }
            });
        });
    </script>
</head>
<div class="span9" style="margin: 30px;">
    <div id="login" >
        <form id="login-form" action="http://192.168.1.10:8080/client/api?command=login" method="get" onSubmit="doSubmit()">
            <table>
                <tr><td>username</td><td><input type="text" id="username" name="username"></td></tr>
                <tr><td>password</td><td><input type="password" id="password" name="password"></td></tr>
                <tr id="forgot"><td></td><td><a href="#">Forgot your password?</a></td></tr>
                <tr><td><button  class="btn btn-inverse" >Login</button></td><td></td></tr>
                <?php echo $this->loginError; ?>
            </table>
        </form>
    </div>
</div>